#include "test_Task.h"
#include "app/app_task.h"
#include "thirdparty/log.c/log.h"
#include <unistd.h>
#include <assert.h>

void task_func(void *argv)
{
    int *p = argv;
    *p += *p;
}

void test_task()
{
    int a = 5;
    Task task;
    task.callback = task_func;
    task.argv = &a;
    app_task_init(10);
    app_task_registerTask(&task);

    sleep(2);
    assert(a == 10);

    app_task_close();
    // app_task_wait();
}